package com.heima.search.es;

import com.heima.search.entity.ApAssociateWords;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author WSJ
 * @Date 2022-03-26-21:36
 * @Version 1.0 （版本号）
 */
@Service
public interface ApAssociateWordsRepository extends MongoRepository<ApAssociateWords, String> {
    /**
     * 查询联想词最新的前10条
     * @param word
     * @return
     */
    List<ApAssociateWords> findTop10ByAssociateWordsContainsOrderByCreatedTimeDesc(String word);
}
